/*
 * @Author: 许鹏飞 2174557392@qq.com
 * @Date: 2025-06-27 09:20:53
 * @LastEditors: 许鹏飞 2174557392@qq.com
 * @LastEditTime: 2025-06-27 09:58:46
 * @FilePath: \第二天的\HelloSwing.java
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.SwingConstants;
public class HelloSwing {
    public static void createGui(){

        System.out.println("createGui");
        JFrame frame = new JFrame("HelloSwing");
        frame.setDefaultCloseOperation(JFrame.
        EXIT_ON_CLOSE);

        frame.setSize(500,500);

        frame.setLocationRelativeTo(null);

        JLabel label = new JLabel("hello,world", SwingConstants.CENTER);

        frame.getContentPane().add(label);

        frame.setVisible(true);
    }

    public static void main(String[] args) {


        createGui();
    
    }
}